package com.squareup.picasso;

import com.bytedance.frameworks.baselib.network.dispatcher.IRequest.Priority;
import com.bytedance.frameworks.baselib.network.dispatcher.AbsRequest;

final class Runnable2AbsRequestTransformer {
    Runnable2AbsRequestTransformer() {

    }

    public static AbsRequest transform(final Runnable runnable) {
        AbsRequest request = new AbsRequest("BitmapHunter", Priority.NORMAL) {

            public final void cancel() {
                super.cancel();
            }

            public final boolean isCanceled() {
                return super.isCanceled();
            }

            public final boolean isDownload() {
                return true;
            }

            public final void run() {
                runnable.run();
            }
        };
        request.start();
        return request;
    }
}

